music = [
	0xff, 0xe3, 0x18, 0xc0, 0x0, 0xc, 0x91, 0xa9, 0x18, 0x1, 0x81, 0x10, 0x0, 0xff, 0xef, 0xfd, 0xc, 0x4b, 0xfc, 0x6d, 0xf,
	0xff, 0xee, 0x46, 0x72, 0x7f, 0xff, 0xee, 0x8c, 0x73, 0x37, 0xff, 0xff, 0x9f, 0x62, 0x8e, 0x20, 0xa0, 0x4f, 0xff, 0x33,
	0x87, 0x3, 0xe0]


def read_mp3():
	with open("music.mp3", "rb+") as mp3:
		while True:
			data = mp3.read(32).hex()

			if data:
				print(bytes(data, "utf-8"))
			else:
				break


def read_bytes():
	count = 0

	for data in music:
		print(bytes([data]), end='')
		count += 1

		if count == 8:
			print()
			count = 0


def write_mp3():
	from media import music

	with open("music2.mp3", "wb") as mp3:
		for byte in music.music:
			mp3.write(bytes([byte]))

		mp3.flush()


# read_mp3()
# read_bytes()
write_mp3()

